package uqbar.comm.netty;

public class StringUtils {

	public static String fillNumber(final int size, final String number) {
		return fillLeft(size, number, '0');
	}

	public static String fillLeft(final int size, final String string, final char c) {
		ProgramException.assertTrue("Se espera que el tamaño del string: {" + string
				+ "} sea menor o igual que el size:" + size, size >= string.length());
		String output = string;
		for (int i = 0; i < size - string.length(); i++) {
			output = c + output;
		}
		return output;

	}

}
